using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Workflow.Activities;
using NETL.Engine.Data;

namespace NETL.Engine.Source
{

	public delegate void MessageReceived(IMessageSource source, IMessage message);

	public delegate void ReceiveError(IMessageSource source, ExecutionResult result);

	public delegate void SourceStopped(IMessageSource source);

	public delegate void SourceStarted(IMessageSource source);


	[ExternalDataExchange]
	public interface IMessageSource
	{
		event MessageReceived Received;
		event ReceiveError Error;
		event SourceStopped Stopped;
		event SourceStarted Started;

		event EventHandler<ExternalDataEventArgs> Foo;
		string Name
		{
			get;
			set;
		}

		//string Description
		//{
		//    get;
		//    set;
		//}

		void Stop();

		void Start();

		ExecutionResult Test();
	}
}